import { $Http } from '@/config/service/http';

export enum Api {
  /**
   * method：POST
   * Content-Type：application/json
   */
  archivesBorrowToBeReturnList = '/dms/archivesBorrow/toBeReturnList', // 借阅待归还列表
  archivesReturnInfoAutoProductFormInfo = '/dms/archivesReturnInfo/autoProductFormInfo', // 自动生成表单
  archivesReturnInfoSave = '/dms/archivesReturnInfo/save', // 保存
  archivesReturnInfoReturnFilesPage = '/dms/archivesReturnInfo/returnFilesPage', // 归还档案详情分页列表
  archivesReturnInfoReturnFilesConfirm = '/dms/archivesReturnInfo/confirm' // 归还档案确认
}

/**
 * 保存
 * @param params
 */
export const archivesReturnInfoSave = (params) => {
  return $Http.api(Api.archivesReturnInfoSave, params, 'post');
};

/**
 * 归还档案详情分页列表
 * @param params
 * id
 * pageNumber	页码
 * pageSize	分页大小
 * sortField	排序字段
 * sortType	升降序，asc=升序，desc=降序
 */
export const archivesReturnInfoReturnFilesPage = (params) => {
  return $Http.api(Api.archivesReturnInfoReturnFilesPage, params, 'post');
};

/**
 * 归还档案确认
 * @param params
 * applyResult 审核结果（1=通过；2=驳回）
 * billId 单据id
 * remark	备注
 * infoVoList 归还档案列表数据
 */
export const archivesReturnInfoReturnFilesConfirm = (params) => {
  return $Http.api(Api.archivesReturnInfoReturnFilesConfirm, params, 'post');
};
